package com.cpit.platform.dao;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import com.cpit.platform.dto.SubSystemUser;
import com.cpit.platform.dto.User;

public interface SubSystemUserRepository extends JpaRepository<SubSystemUser, Long> {
	@SuppressWarnings("unchecked")
	SubSystemUser save(SubSystemUser uToSs);
	void delete(SubSystemUser uToSs);
	void deleteById(Integer id);
	SubSystemUser findById(Integer id);
	SubSystemUser findByUsername(String name);
	SubSystemUser findByUsernameAndSubSystem(String name, Integer subSystem);
	List<SubSystemUser> findBySubSystem(int ssId);
	
	Page<SubSystemUser> findByUsernameContaining(
    		String username, 
    		Pageable pageable);
}
